
/**
 * 计算阶乘
 */
#include <iostream>

int main(int argc, char const *argv[])
{
	/* code */
	const int arSize = 16;
	long long factorials[arSize];
	factorials[1] = factorials[0] =1LL;
	/**
	 * 数据运算
	 */
	for (int i = 2; i < arSize ; ++i)
	{
		factorials[i] = i*factorials[i-1];
	}
	/**
	 * 数据输出
	 */
	for (int i = 0; i < arSize; ++i)
	{
		std::cout << i <<"! "<<factorials[i] <<std::endl;
	}
	return 0;
}